use Alvin;
create table RawMaterial
(
Id int primary key identity ,
Sn char(3) not null,
Name varchar(60) not null,
Bn varchar(60) default null,
ShortName varchar(60) not null,
CategoryId int,
PlaceOfProduction varchar(200) default null,
TaxRate float default 0,
UsageRate float default 1,
Specification text,
MaximumInventory float,
MinimunInventory float,
BoughtUnit varchar(20),
InventoryUnit varchar(20),
CostCardUnit varchar(20),
InventoryToCostCardRatio int,
InventoryToBoughtRatio int,
DirectSalePrice float default 0,
IndirectSalePrice float default 0,
CostPrice float default 0,
BoughtPrice float default 0,
LowestBoughtPrice float default 0,
LatestBoughtPrice float default 0,
Stocks float default 0,
Memo text default null,
IsDisabled tinyint default 0,
);
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   'This is my table comment',
   'user', @CurrentUser, 'table', 'RawMaterial'
go